Skip to content

Prefer @typescript-eslint/no-unused-expression #450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

rwaskiewicz
Copy link
Contributor

PR Checklist

  • Addresses an existing issue: fixes #000
  • That issue was marked as status: accepting prs
  • Neither 😬 If this gets sent to the back of the queue, that's OK 🙂

Overview

This PR largely builds off of the work in #205. It updates the converter to use @typescript-eslint/no-unused-expressions over ESLint's no-unused-expressions rule (the @typescript-eslint version seems to have come along after #205 was landed).

Looking at the rule source, the only thing that the new rule seems to add is support for optional call expressions (thanks TS 3.7 ❤️) and directives in modules . I didn't see any additional flags added to the new rule that would need to be added to the existing tests (I think 😉)

- Update converter for no-unused-expression to use the @typescript-eslint variation
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Swell, looks good to me - and +1 for the informative description. Thanks!

@JoshuaKGoldberg JoshuaKGoldberg merged commit dffdf40 into typescript-eslint:master May 5, 2020
@rwaskiewicz rwaskiewicz deleted the rwaskewicz/prefer-typescript-eslint-verison-no-unused-expression branch May 5, 2020 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants